<!-- 商家提现银行卡表单弹窗 -->
<form id="businessbankaccount-form" lay-filter="businessbankaccount-form" class="layui-form model-form" style="overflow:auto; height:500px;width:90%;">
    <input name="brankAccountId" type="hidden"/>

 		    <div class="layui-form-item">
        <label class="layui-form-label">银行名称</label>
        <div class="layui-input-block">
            <input name="bankName" placeholder="请输入银行名称" type="text" class="layui-input" maxlength="20"  id="bankName"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">银行卡号</label>
        <div class="layui-input-block">
            <input name="bankCardNumber" placeholder="请输入银行卡号" type="text" class="layui-input" maxlength="20"  id="bankCardNumber"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">银行账号名称</label>
        <div class="layui-input-block">
            <input name="bankAccountName" placeholder="请输入银行账号名称" type="text" class="layui-input" maxlength="20"  id="bankAccountName"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">银行预留手机号</label>
        <div class="layui-input-block">
            <input name="bankReservedPhone" placeholder="请输入银行预留手机号" type="text" class="layui-input" maxlength="20"  id="bankReservedPhone"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">身份证号码</label>
        <div class="layui-input-block">
            <input name="idNumber" placeholder="请输入身份证号码" type="text" class="layui-input" maxlength="20"  id="idNumber"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">创建时间</label>
        <div class="layui-input-block">
            <input name="createTime" placeholder="请输入创建时间" type="text" class="layui-input" maxlength="20"  id="createTime"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">更新时间</label>
        <div class="layui-input-block">
            <input name="updateTime" placeholder="请输入更新时间" type="text" class="layui-input" maxlength="20"  id="updateTime"
                   lay-verify="required" required/>
        </div>
    </div>
     <div class="layui-form-item model-form-footer">
        <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button>
        <button class="layui-btn" lay-filter="user-form-submit" lay-submit>保存</button>
    </div>
</form>

<script>
    layui.use(['layer', 'admin', 'form', 'formSelects'], function () {
        var layer = layui.layer;
        var admin = layui.admin;
        var form = layui.form;
        var formSelects = layui.formSelects;
 
        var businessbankaccount = admin.getTempData('t_businessbankaccount');
           if (businessbankaccount.method=="update"){
        	form.val('businessbankaccount-form', businessbankaccount);
            form.render();
        }
        // 表单提交事件
        form.on('submit(user-form-submit)', function (data) {
             layer.load(2);
            
            admin.req('business/businessbankaccount/'+businessbankaccount.method, JSON.stringify(data.field), function (data) {
                layer.closeAll('loading');
                if (data.code == 0) {
                    layer.msg(data.msg, {icon: 1, time: 500});
                    admin.finishPopupCenter();
                } else {
                    layer.msg(data.msg, {icon: 2, time: 500});
                }
            }, "post");  
            return false;
        });
    });
</script>
